-- GENERATED SPELL FOR [Hath'ar Necromagus] --


function spell0_28257(pUnit, Event) --@Conversion Beam,n/a--
pUnit:FullCastSpellOnTarget(54491,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28257', 10000, 1)
end

function spell1_28257(pUnit, Event) --@Scourging Reanimation,n/a--
pUnit:FullCastSpellOnTarget(51139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28257', 10317, 1)
end

function Sorts_28257(pUnit, Event)
local choix_sorts_28257 = math.random(0, 1)
if choix_sorts_28257 == 0 then
pUnit:RegisterEvent('spell0_28257', 1, 1)
end
if choix_sorts_28257 == 1 then
pUnit:RegisterEvent('spell1_28257', 1, 1)
end
end

function mob28257_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28257', math.random(1500, 3000), 1)
end

function mob28257_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28257_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28257_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28257, 1, 'mob28257_Action')
RegisterUnitEvent(28257, 2, 'mob28257_Leave')
RegisterUnitEvent(28257, 3, 'mob28257_Kill')
RegisterUnitEvent(28257, 4, 'mob28257_Die')
